<include file="public/header"/>

<body>

<!--main-->
<div class="pconsultant-detaHead">
  <div class="pic">
    <a href="javascript:;"><img src="{$detail.head_img|head_img}" class="enlargeImg"></a>
  </div>
  <h3 class="tit" style="color:#fff;">{$detail.coach_name}</h3>
  <div class="age" style="color:#fff;">
    <!--<img src="__PUBLIC__/home/images/age-nv.png"> 教龄：9年-->
    <if condition="$detail.sex eq 0">男<else/>女</if>&ensp;&ensp;从业年限：{$detail.year}年
  </div>
</div>
<div class="pPersonal-warp" style="overflow:inherit;">
  <div class="pabout-info">
    <h3 class="t">顾问/教练简介</h3>
    <div class="c">
      {$detail.coach_remark}
    </div>
  </div>

  <!--<h3 class="pconsultant-detaTit">精选点评</h3>-->

  <!--<ul class="pconsultant-detaReview">-->
    <!--<li>-->
      <!--<div class="li-port clearfix">-->
        <!--<img src="__PUBLIC__/home/images/img04.png" class="img"><span class="name">夜雨**星空</span>-->
        <!--<label class="level">Lv3</label>-->
      <!--</div>-->
      <!--<div class="li-score clearfix">-->
        <!--打分<img src="__PUBLIC__/home/images/start-4.png">-->
      <!--</div>-->
      <!--<div class="li-text">-->
        <!--红酥手，黄藤酒，满城春色宫墙柳。卿本佳人-->
      <!--</div>-->
      <!--<span class="li-date">2017.10.28</span>-->
      <!--<dl class="li-pic clearfix">-->
        <!--<dd> <img src="__PUBLIC__/home/images/img03.jpg"> </dd>-->
      <!--</dl>-->
    <!--</li>-->
    <!--<li>-->
      <!--<div class="li-port clearfix">-->
        <!--<img src="__PUBLIC__/home/images/img04.png" class="img"><span class="name">夜雨**星空</span>-->
        <!--<label class="level">Lv3</label>-->
      <!--</div>-->
      <!--<div class="li-score clearfix">-->
        <!--打分<img src="__PUBLIC__/home/images/start-4.png">-->
      <!--</div>-->
      <!--<div class="li-text">-->
        <!--红酥手，黄藤酒，满城春色宫墙柳。卿本佳人-->
      <!--</div>-->
      <!--<span class="li-date">2017.10.28</span>-->
      <!--<dl class="li-pic clearfix">-->
        <!--<dd> <img src="__PUBLIC__/home/images/img03.jpg"> </dd>-->
      <!--</dl>-->
    <!--</li>-->
  <!--</ul>-->
  <!--<a href="javascript:;" class="pconsultant-detaMore">加载更多</a>-->
  <div class="pconsultant-detaButton clearfix">
    <!--<a href="{:U('Coach/review')}" class="btn"><i class="iconfont">&#xe600;</i>评论</a>-->
    <a href="javascript:;" class="btn"  data-id="{$detail.coach_id}" onClick="choose_coach(this)">顾问/教练金额￥<strong>{$detail.coach_price}</strong>，选择</a>
  </div>
</div>
<!--main End-->
<script>

  function choose_coach(obj) {
      //console.log(1);
      var id = $(obj).attr('data-id');
      //console.log(id);
      $.ajax({
          type : "POST",
          url: '/home/order/place_order.html',
          data : {coach_id:id},
          dataType: 'json',
          success: function(data){
              if(data.status==200){
                  window.location.href = "{:U('order/place_order')}";
              }else{
                  window.location.href = "{:U('User/login')}";
              }}
      });
  }

</script>

<style type="text/css">
 .enlargeImg_wrapper {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-size:100% auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-color:#000;
}

</style>

<script type="text/javascript">
	$(function() {
		enlargeImg();
	})
	//查看大图
	function enlargeImg() {
	  $(".enlargeImg").click(function() {
	    $(this).after("<div onClick='closeImg()' class='enlargeImg_wrapper'></div>");
	    var imgSrc = $(this).attr('src');
	    $(".enlargeImg_wrapper").css("background-image", "url(" + imgSrc + ")");
	    $('.enlargeImg_wrapper').fadeIn(200);
	  })
	}
	//关闭并移除图层
	function closeImg() {
	  $('.enlargeImg_wrapper').fadeOut(200).remove();
	}
</script>

</body>
</html>
